package com.neuedu.security.controller;

import com.neuedu.security.model.RespBean;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @GetMapping("/admin/hello")
    public String hello1() {
        return "admin hello";
    }

    @GetMapping("/dba/hello")
    public String hello2() {
        return "dba hello";
    }

    @GetMapping("/user/hello")
    public String hello3() {
        return "user hello";
    }

    @GetMapping("/hello")
    public String hello4() {
        return "hello";
    }

    @GetMapping("/login")
    public RespBean login() {
        return RespBean.fail(401, "对不起，请先登录！");
    }
}
